Skip to content

Add event bus handler and proxy support to gRPC code generation#241

Open
zZHorizonZz wants to merge 1 commit intoeclipse-vertx:mainfrom
zZHorizonZz:event-bus
Open

Add event bus handler and proxy support to gRPC code generation#241
zZHorizonZz wants to merge 1 commit intoeclipse-vertx:mainfrom
zZHorizonZz:event-bus

Conversation

@zZHorizonZz
Copy link
Member

Motivation:

  • Let gRPC services communicate over the Vert.x event bus instead of HTTP/2, which is handy when services live in the same cluster.
  • Only unary-unary methods are supported; streaming methods throw UnsupportedOperationException.

Changes:

  • New plugin options event-bus-handler and event-bus-proxy to toggle code generation.
  • Added EventBusHandlerGenerator and EventBusProxyGenerator that generate handler and proxy classes from the service contract.
  • Extended GenerationOptions, ServiceTemplateContext, and GenerationType accordingly.
  • Added EventBusTest to verify generated code end-to-end.
  • Updated plugin docs and added GrpcEventBusExamples covering handler registration, proxy usage, and delivery options.

Motivation:

- Let gRPC services communicate over the Vert.x event bus instead of HTTP/2, which is handy when services live in the same cluster.
- Only unary-unary methods are supported; streaming methods throw UnsupportedOperationException.

Changes:

- New plugin options `event-bus-handler` and `event-bus-proxy` to toggle code generation.
- Added EventBusHandlerGenerator and EventBusProxyGenerator that generate handler and proxy classes from the service contract.
- Extended GenerationOptions, ServiceTemplateContext, and GenerationType accordingly.
- Added EventBusTest to verify generated code end-to-end.
- Updated plugin docs and added GrpcEventBusExamples covering handler registration, proxy usage, and delivery options.

Signed-off-by: Daniel Fiala <danfiala23@gmail.com>
@zZHorizonZz zZHorizonZz requested review from vietj February 16, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant